const { dialog } = require("@electron/remote");

window.addEventListener("DOMContentLoaded", () => {
  showBtn.addEventListener("click", () => {
    dialog.showOpenDialog({
      defaultPath: __dirname,
      buttonLabel: "请选择",
      title: "等鱼弹窗",
      properties: [ "openFile", "multiSelections" ],
      filters: [
        { name: "代码文件", extensions: [ "js", "css", "html" ] },
        { name: "图片文件", extensions: [ "png", "jpeg", "jpg", "webp", "ico" ] }
      ]
    }).then((res) => {
      console.log(res);
    });
  });

  errBtn.addEventListener("click", () => {
    dialog.showErrorBox("自定义的错误标题", "当前错误内容");
  });
});